<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="包装条码补打" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-8 font-0">
                    <button type="button" class="btn btn-operate m-r-sm" ng-click="batchPrint('preview')"
                            ng-disabled="!btnPermission.rePrintPrint" translate translate-attr-title="{{!btnPermission.rePrintPrint?'无权限执行此操作':''}}">打印预览</button>
                    <button type="button" class="btn btn-operate m-r-sm" ng-click="batchPrint('print')"
                            ng-disabled="!btnPermission.rePrintPrint" translate translate-attr-title="{{!btnPermission.rePrintPrint?'无权限执行此操作':''}}">打印</button>
                    <button class="btn btn-operate m-r-sm" ng-click="switchToolbar('PrintConf')" translate>打印配置</button>
                </div>
                <div class="search-bar wrapper-none col-xs-4">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="零件编号" ng-model="condition.materialsNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件编号</span>：</label>
                        <input type="text" name="mobile" class="form-control" ng-model="condition.materialsNo">
                    </div>
                    <!-- xbt -->
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>多零件编号</span>：</label>
                        <textarea class="form-control" placeholder="逗号分隔或者换行分隔" ng-blur="handleBlur($event)"></textarea>
                    </div>
                    <!-- xbt -->
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>单据号</span>：</label>
                        <input type="text" name="name" class="form-control col-xs-8" ng-model="condition.billNo">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>条码</span>：</label>
                        <input type="text" name="barcode" class="form-control col-xs-8" ng-model="condition.barcode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>操作人</span>：</label>
                        <input type="text" name="createName" class="form-control col-xs-8" ng-model="condition.createName">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>出库单号</span>：</label>
                        <input type="text" name="businessOrder" class="form-control col-xs-8" ng-model="condition.businessOrder">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>配送指令号</span>：</label>
                        <input type="text" name="businessOrder" class="form-control col-xs-8" ng-model="condition.deliveryInsNo">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>发运交接单号</span>：</label>
                        <input type="text" name="deliveryReceiptNo" class="form-control col-xs-8" ng-model="condition.deliveryReceiptNo">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>条码类型</span>：</label>
                        <select name="materialsType" class="form-control" ng-model="condition.barcodeFlag"
                                yb-focus>
                            <option value="" translate>请选择</option>
                            <option value="0">总条码</option>
                            <option value="1">分条码</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>打印状态</span>：</label>
                        <select name="barcodeStatus" class="form-control" ng-model="condition.barcodeStatus"
                                yb-focus>
                            <option value="" translate>请选择</option>
                            <option value="0">已打印</option>
                            <option value="1">已入库</option>
                            <option value="2">已出库</option>
                            <option value="3">已拆分</option>
                        </select>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"><span translate>创建时间</span>：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.beginDate"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showDatepickerBegin = !showDatepickerBegin"
                               ng-change="checkDate(condition, 'beginDate', 'endDate')"
                               ng-class="{'error': !condition.beginDate}"
                               is-open="showDatepickerBegin" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.endDate"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showDatepickerEnd = !showDatepickerEnd"
                               ng-change="checkDate(condition, 'beginDate', 'endDate')"
                               ng-class="{'error': !condition.endDate}"
                               is-open="showDatepickerEnd" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">仓库编码：</label>
                        <input type="text" class="form-control" ng-model="condition.warehouseCode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">库区编码：</label>
                        <input type="text" class="form-control" ng-model="condition.areaCode">
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                 has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div yb-print-conf show-toolbar="toolbarConfig.showPrintConf" ng-model="tempSet" hide-main-code="true"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="text-center th-check border-l-none">
                                    <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll()"></div>
                                </th>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth" fixed-width="tbStyle.scrollLeft"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td width="40" class="text-center border-l-none">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item)"></div>
                                </td>
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed" title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="print(item, 'preview')"
                                                ng-disabled="!btnPermission.rePrintPrint" translate translate-attr-title="{{!btnPermission.rePrintPrint?'无权限执行此操作':''}}">预览打印</button>
                                        <button type="button" class="btn btn-operate" ng-click="print(item, 'print')"
                                                ng-disabled="!btnPermission.rePrintPrint" translate translate-attr-title="{{!btnPermission.rePrintPrint?'无权限执行此操作':''}}">打印</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed" title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="print(item, 'preview')"
                                                ng-disabled="!btnPermission.rePrintPrint" title="{{!btnPermission.rePrintPrint?'无权限执行此操作':''}}">预览打印</button>
                                        <button type="button" class="btn btn-operate" ng-click="print(item, 'print')"
                                                ng-disabled="!btnPermission.rePrintPrint" title="{{!btnPermission.rePrintPrint?'无权限执行此操作':''}}">打印</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选" yb-click="selectAll()"></div>
                <button type="button" class="btn btn-operate" ng-click="batchPrint('print')"
                        ng-disabled="!btnPermission.rePrintPrint" translate translate-attr-title="{{!btnPermission.rePrintPrint?'无权限执行此操作':''}}">打印</button>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
    </div>
</div>

<div id="printXgcy" ng-include="'view/printTemplate/cyTicketTpl.html'" ng-show="false"></div>